﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PDX.ChangeTracking
{
    /// <summary>
    /// A change defined by its <see cref="OriginalSnapshot"/>
    /// and <see cref="LatestSnapshot"/>.
    /// </summary>
    /// <typeparam name="T">the type of the Snapshot</typeparam>
    public class Change<T> : INPC where T : Snapshot
    {
        /// <summary>
        /// Gets or sets the original snapshot.
        /// </summary>
        /// <value>
        /// The original snapshot.
        /// </value>
        public T OriginalSnapshot { get; set; }

        /// <summary>
        /// Gets or sets the latest snapshot.
        /// </summary>
        /// <value>
        /// The latest snapshot.
        /// </value>
        public T LatestSnapshot { get; set; }

        string _description;
        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public string Description
        {
            get { return _description; }
            set
            {
                _description = value;
                OnPropertyChanged("Description");
            }
        }
    }
}
